package imper.engine.battle;

import org.newdawn.slick.AppGameContainer;
import org.newdawn.slick.SlickException;

import imper.engine.battle.entity.IBatPosition;
import imper.engine.battle.entity.impl.BatMap;
import imper.engine.battle.entity.impl.BatMapCase;
import imper.engine.battle.entity.impl.BatUnit;
import imper.engine.battle.view.BattleGame;
import imper.engine.entity.Position;

public class BatMain
{

	/**
	 * @param args
	 * @throws SlickException 
	 */
	public static void main(String[] args) throws SlickException
	{
		IModel model = new Model();
		BatMap map = new BatMap(100,100);
		// initialisation de la carte
		for (int x = 0; x < map.getSizeX(); x++)
		{
			for (int y = 0; y < map.getSizeY(); y++)
			{
				//int xx = (y % 2 == 0 ? x : x);
				IBatPosition pos = new Position(x,y);
				map.addCase(new BatMapCase(null,pos));
			}
		}
		map.getCase( new Position(4,4) ).addUnit( new BatUnit() );
		model.setMap( map );
	    AppGameContainer app = new AppGameContainer(new BattleGame("Battle Simulator",model));
	    app.setDisplayMode(800, 600, false);
	    app.start();
	}

}
